package br.com.poc.pitagorasnumero.presenter.impl;

import android.content.Context;
import br.com.poc.pitagorasnumero.model.bo.IFacebookBO;
import br.com.poc.pitagorasnumero.presenter.IFacebookInitPresenter;

import com.google.inject.Inject;

/**
 * @author irlan.gomes
 * 
 */
public class MainMenuPresenter implements IFacebookInitPresenter {

	@Inject
	private IFacebookBO facebookBO;

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * br.com.poc.pitagorasnumero.view.presenter.IFacebookInit#initFacebook(
	 * android.content.Context)
	 */
	@Override
	public void initFacebook(Context context) {
		facebookBO.init(context);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * br.com.poc.pitagorasnumero.view.presenter.IFacebookInit#logoutFacebook()
	 */
	@Override
	public void logoutFacebook() {
		facebookBO.doDisconnect();
		// view.changeFacebookImageBtn(facebookBO.isLoggedIn());
		// TODO
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * br.com.poc.pitagorasnumero.view.presenter.IFacebookInit#isFacebookLoggedIn
	 * ()
	 */
	@Override
	public boolean isFacebookLoggedIn() {
		return facebookBO.isLoggedIn();
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see br.com.poc.pitagorasnumero.view.presenter.IFacebookInit#
	 * doAuthenticationFacebook()
	 */
	@Override
	public void doAuthenticationFacebook() {
		facebookBO.doAuthentication();
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see br.com.poc.pitagorasnumero.view.presenter.IFacebookInit#
	 * unregisterReceiverForFacebook()
	 */
	@Override
	public void unregisterReceiverForFacebook() {
		facebookBO.unregisterBroadcast();
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * br.com.poc.pitagorasnumero.view.presenter.IFacebookInit#doDisconnectFacebook
	 * ()
	 */
	@Override
	public void doDisconnectFacebook() {
		facebookBO.doDisconnect();
	}
	
	

}
